<template>
  <el-row :gutter="20">
    <el-col :span="10">
      <el-card shadow="never">
        <div slot="header" style="text-align: center" class="clearfix">
          <span>基本信息</span>
        </div>
        <detail-form ref="detailForm" />
      </el-card>
    </el-col>
    <el-col :span="14">
      <el-card shadow="never">
        <div slot="header" style="text-align: center" class="clearfix">
          <span>盘点计划详情</span>
        </div>
        <detail-table ref="detailTable" />
      </el-card>
    </el-col>
  </el-row>
</template>

<script>
import DetailForm from './form'
import DetailTable from './table'
import { getSession, setSession } from '@/utils/util'

export default {
  components: {
    DetailForm,
    DetailTable
  },
  data() {
    return {
      headStyle: {
        textAlign: 'center'
      },
      mdl: {}
    }
  },
  // async mounted() {
  //   console.log('route', this.$route)
  //   const { params } = this.$route
  //   if (JSON.stringify(params) !== '{}') {
  //     this.mdl = Object.assign({}, params.obj)
  //     setSession('taskListDetail', this.mdl)
  //   } else {
  //     this.mdl = Object.assign({}, getSession('taskListDetail'))
  //   }
  // },
  methods: {
    edit(obj) {
      this.$refs.detailForm.edit(obj)
      this.$refs.detailTable.edit(obj)
    }
  }
}
</script>
